home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue35 / construc / AUTOMAIL.DPR next >
Encoding:
Text File  |  1998-06-18  |  857 b   |  31 lines

  1. {$APPTYPE CONSOLE}
  2. uses
  3.   TBOBSMTP;
  4. begin
  5.   writeln('content-type: text/html');
  6.   writeln;
  7.   writeln('<HTML>');
  8.   writeln('<BODY>');
  9.   writeln('<PRE>');
  10.   with TBSMTP.Create(nil) do
  11.   try
  12.     MailServer := 'mail.server.com'; { insert your own SMTP mailhost here }
  13.     MessageFrom := 'RobotBob';
  14.     MessageTo := 'bob@drbob.demon.nl';
  15.     MessageSubject := 'Automatic E-mail using SMTP';
  16.     MessageText.Add('Hi Bob,');
  17.     MessageText.Add('');
  18.     MessageText.Add('It looks like this is really working, eh?');
  19.     MessageText.Add('(and this time we sent it from the server)');
  20.     MessageText.Add('');
  21.     MessageText.Add('Groetjes,');
  22.     MessageText.Add('           Bob Swart (aka Dr.Bob - www.drbob42.com)');
  23.     SendMail;
  24.   finally
  25.     Free;
  26.     writeln('</PRE>');
  27.     writeln('</BODY>');
  28.     writeln('</HTML>')
  29.   end
  30. end.
  31.